package com.eric.kafka;


import java.util.Base64;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author chenw-i
 * @version 1.0.0
 * @ClassName A.java
 * @Description TODO
 * @createTime 2021年04月08日 09:26:00
 */
public class A {
    public static void main(String[] args) {
//        String pattern = "(\\【)(\\d+)(\\】)";
//        Pattern r = Pattern.compile(pattern);
//
//        String msg = "【阿斯顿发斯蒂芬】ad阿斯顿发生的发生的【12345】";
//
//        Matcher m = r.matcher(msg);
//        if(m.find()){
//            System.out.println(m.group()+m.group(2));
//        }else{
//            System.out.println("没有发现");
//        }
        try {
            String phone = "16601295786";
            String encode = new String(Base64.getEncoder().encode(phone.getBytes()));
            System.out.println(encode);
            phone = new String(Base64.getDecoder().decode(encode.getBytes()));
            System.out.println(phone);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
